Due to characteristics such as low energy consumption and a high capacity, an optical switch attracts increasing attention. A core of the optical switch is an optical switch switching matrix. The optical switch switching matrix generally includes many optical switch cells according to a specific rule. In the optical switch, establishment of a switching path is implemented by changing statuses of these optical switch cells. However, due to process limits, it is very difficult to manufacture, by using whichever optical switch technology, two optical switch cells having totally same performance, as a result, different optical switch cells cause different losses to a signal. Therefore, a switching path on which multilevel optical switch cells are cascaded inevitably causes different losses to a signal.
In conclusion, due to defects of the optical switch switching matrix, after optical switching is performed, a relatively large difference inevitably exists between parameters, such as powers, phases, and polarization states, of optical signals received at a same receive port. The difference increases difficulty in subsequent signal processing and increases a bit error rate of a system.
FIG. 1 shows a technical solution for resolving a problem of an unequalized link power. In the technical solution, some data of an optical packet passes through an optical switch, and is then converted into an electrical signal by means of optical-to-electrical conversion, and the electrical signal enters an optical packet receiving apparatus. A detection control unit of the optical packet receiving apparatus is configured to detect parameter values, such as an average power, a packet density, an extinction ratio (ER) value, and a switch switching time, of a signal of some data of a switched optical packet, and then send these parameter values to an information collection unit. A peak power calculation unit obtains a peak power of the optical packet by means of calculation according to information in the information collection unit, and then sends the peak power of the optical packet to a control unit. When determining that the peak power of the optical packet is less than a preset value, the control unit instructs an upper-level switch to adjust a transmit power of a transmit port or adjust a gain of an amplifier of a current-level optical packet switching apparatus, to compensate a power of the optical packet.
However, in this manner, because a compensation value of an optical signal needs to be calculated according to parameter values of a signal of some data of a switched optical packet, a delay exists, and the optical signal cannot be quickly compensated.